package com.leo.foodmaster.admin.system.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leo.foodmaster.admin.system.entity.SysConfigEntity;
import com.leo.foodmaster.admin.system.mapper.SysConfigMapper;
import com.leo.foodmaster.admin.system.service.ISysConfigService;
import lombok.AllArgsConstructor;

/**
 * 参数配置表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2021-12-22
 */
@Service
@AllArgsConstructor
public class ISysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfigEntity> implements ISysConfigService {

	private final SysConfigMapper sysConfigMapper;
	@Override
	public IPage<SysConfigEntity> page(IPage<SysConfigEntity> page, SysConfigEntity sysConfigEntity) {
		LambdaQueryWrapper<SysConfigEntity> eq = Wrappers.lambdaQuery(sysConfigEntity);
		return sysConfigMapper.selectPage(new Page<>(page.getCurrent(),page.getSize()), eq);
	}

}
